package com.tarena.luban.test.config;

import com.tarena.luban.test.bean.Bean01;
import org.springframework.context.annotation.*;

/**
 * 作为spring容器入口加载的类,不一定必须添加注解
 * 为了标注当前类是配置
 */
@Configuration
@ComponentScan(basePackages ={"com.tarena.luban.test.bean","com.tarena.luban.test.config.condition"} )
@Import({MyConfig02.class})
@ImportResource("demo03.xml")
@PropertySource("classpath:demo.properties")
public class MyConfig01 {
    @Bean
    public Bean01 bean01(){
        Bean01 bean01=new Bean01();
        bean01.setAge("19");
        bean01.setName("刘首付");
        return bean01;
    }
}
